package com.ruoyi.students.service.impl;

import com.ruoyi.students.domain.Awards;
import com.ruoyi.students.mapper.AwardsMapper;
import com.ruoyi.students.service.IAwardsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 获奖信息Service业务层处理
 * 
 * @author yxy
 * @date 2024-10-17
 */
@Service
public class AwardsServiceImpl implements IAwardsService 
{
    @Autowired
    private AwardsMapper awardsMapper;


    /**
     * 查询获奖信息列表
     * 
     * @param awards 获奖信息
     * @return 获奖信息
     */
    @Override
    public List<Awards> selectAwardsList(Awards awards)
    {
        return awardsMapper.selectAwardsList(awards);
    }

    /**
     * 新增获奖信息
     * 
     * @param awards 获奖信息
     * @return 结果
     */
    @Override
    public int insertAwards(Awards awards)
    {
        return awardsMapper.insertAwards(awards);
    }

    /**
     * 修改获奖信息
     * 
     * @param awards 获奖信息
     * @return 结果
     */
    @Override
    public int updateAwards(Awards awards)
    {
        return awardsMapper.updateAwards(awards);
    }

    /**
     * 批量删除获奖信息
     * 
     * @param awardIds 需要删除的获奖信息主键
     * @return 结果
     */
    @Override
    public int deleteAwardsByAwardIds(Long[] awardIds)
    {
        return awardsMapper.deleteAwardsByAwardIds(awardIds);
    }

    /**
     * 删除获奖信息信息
     * 
     * @param awardId 获奖信息主键
     * @return 结果
     */
    @Override
    public int deleteAwardsByAwardId(Long awardId)
    {
        return awardsMapper.deleteAwardsByAwardId(awardId);
    }

    /**
     * 根据学号获取得奖的详细信息
     * @param awardId
     * @return
     */
    @Override
    public Awards selectAwardsByAwardId(String awardId) {
        return awardsMapper.selectAwardsByAwardId(awardId);
    }

    @Override
    public List<Awards> selectAwardsListByStudentId(String StudentId) {
        return awardsMapper.selectAwardsListByStudentId(StudentId);
    }

    @Override
    public List<Awards> selectStudentsByStudentId(String studentId) {
        return awardsMapper.selectAwardsListByStudentId(studentId);
    }
}
